<? include 'server_config.php'; 

if($_SESSION['user_idx'] == "")
{
	?>
	<script>
		location.href='login.php';
	</script>
	<?
	return;
}


$sql_2="
	SELECT birthday FROM ndd_user_expand WHERE user_idx = $user_idx LIMIT 1;
";
		
$result_2 = mysql_query($sql_2,$connect);

$row2 = mysql_fetch_row($result_2);

//나이
if($row2[0]!="0000-00-00" && $row2[0]!="")
{
	//생일 입력
	$myBirthDate    = strtotime($row2[0]);

	//만나이
	$birthDate1     = date( 'Ymd', $myBirthDate );
	$nowDate1       = date('Ymd');
	$age1           = floor(($nowDate1 - $birthDate1) / 10000);

	//한국 나이
	$birthDate2     = date( 'Y', $myBirthDate );
	$nowDate2       = date('Y');
	$age2           = $nowDate2 - $birthDate2 + 1 ;

	$age = $age2;
}

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<link rel="stylesheet" type="text/css" href="css/4_5.css"/>
	<script type="text/javascript" src="js/jquery-1.6.2.min.js">
	</script>
	<script type="text/javascript" src="js/4_5.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			SideBarAction.initialize();
			AnswerSheetAction.initialize();
                        AnswerSheetAction.onDataInitialize();
                        IEBrowser.onUnavailableIE();
		});
	</script>
		
	<title>Next Door Doctor</title>
</head>
<body>
	<div id="header">
		<?
		include "top_menu.php";
		?>
		<div id="header_content">
			<div id="header_navigation"></div>
			<div id="header_notice">
				<img id="notice_icon" src="images/top_icon_input.png" alt="top icon">
				<div id="notice">류마티스 관절염에 대한 증상을 진단해보세요</div>
				<a id="notice_img" href="5_1.php">
					<img src="images/button_view_my_chart.png" alt="view my chart" border="0"/>
				</a>
			</div>
		</div>
	</div>
	<div id="body">
		<?
		$current_file = basename(__FILE__);
		include 'side_menu_input.php';
		?>

		<div id="body_content">
			<input type='hidden' id='age' value='<?=$age?>'>
			<ol id="question_list">
				<li id="question_01">
					<q>관절이 붓거나 아픈 곳을 모두 표시해주세요.</q>
					<div class="answer_sheet">
						<div id="checked_point">
							<span id="before_notice"></span>
							<div id="body">
								<span class="body_L_01">왼쪽 어깨<br/></span>
								<span class="body_R_01">오른쪽 어깨<br/></span>
								<span class="body_L_02">왼쪽 팔꿈치<br/></span>
								<span class="body_R_02">오른쪽 팔꿈치<br/></span>
								<span class="body_L_03">왼쪽 손목<br/></span>
								<span class="body_R_03">오른쪽 손목<br/></span>
								<span class="body_L_04">왼쪽 골반<br/></span>
								<span class="body_R_04">오른쪽 골반<br/></span>
								<span class="body_L_05">왼쪽 무릎<br/></span>
								<span class="body_R_05">오른쪽 무릎<br/></span>
								<span class="body_L_06">왼쪽 발목<br/></span>
								<span class="body_R_06">오른쪽 발목</span>								
							</div>
							<div id="hand">
								왼손 관절<br/>&nbsp;&nbsp;▶
								<span class="hand_L_01">1</span>
								<span class="hand_L_02">2</span>
								<span class="hand_L_03">3</span>
								<span class="hand_L_04">4</span>
								<span class="hand_L_05">5</span>
								<span class="hand_L_06">6</span>
								<span class="hand_L_07">7</span>
								<span class="hand_L_08">8</span>
								<span class="hand_L_09">9</span>
								<br/>
								오른손 관절<br/>&nbsp;&nbsp;▶
								<span class="hand_R_01">1</span>
								<span class="hand_R_02">2</span>
								<span class="hand_R_03">3</span>
								<span class="hand_R_04">4</span>
								<span class="hand_R_05">5</span>
								<span class="hand_R_06">6</span>
								<span class="hand_R_07">7</span>
								<span class="hand_R_08">8</span>
								<span class="hand_R_09">9</span>
							</div>
							<div id="foot">
								왼발 관절<br/>&nbsp;&nbsp;▶
								<span class="foot_L_01">1</span>
								<span class="foot_L_02">2</span>
								<span class="foot_L_03">3</span>
								<span class="foot_L_04">4</span>
								<span class="foot_L_05">5</span>
								<br/>
								오른발 관절<br/>&nbsp;&nbsp;▶
								<span class="foot_R_01">1</span>
								<span class="foot_R_02">2</span>
								<span class="foot_R_03">3</span>
								<span class="foot_R_04">4</span>
								<span class="foot_R_05">5</span>
							</div>
						</div>
						<div id="help_img">
							<a id="body_R_01"><img src="images/dot_blue.png" alt="오른쪽 어깨"/></a>
							<a id="body_R_02"><img src="images/dot_blue.png" alt="오른쪽 팔꿈치"/></a>
							<a id="body_R_03"><img src="images/dot_blue.png" alt="오른쪽 손목"/></a>
							<a id="body_R_04"><img src="images/dot_blue.png" alt="오른쪽 골반"/></a>
							<a id="body_R_05"><img src="images/dot_blue.png" alt="오른쪽 무릎"/></a>
							<a id="body_R_06"><img src="images/dot_blue.png" alt="오른쪽 발목"/></a>
							<a id="body_L_01"><img src="images/dot_blue.png" alt="왼쪽 어깨"/></a>
							<a id="body_L_02"><img src="images/dot_blue.png" alt="왼쪽 팔꿈치"/></a>
							<a id="body_L_03"><img src="images/dot_blue.png" alt="왼쪽 손목"/></a>
							<a id="body_L_04"><img src="images/dot_blue.png" alt="왼쪽 골반"/></a>
							<a id="body_L_05"><img src="images/dot_blue.png" alt="왼쪽 무릎"/></a>
							<a id="body_L_06"><img src="images/dot_blue.png" alt="왼쪽 발목"/></a>
							<a id="hand_R_01"><img src="images/dot_blue.png" alt="오른손 관절 01"/></a>
							<a id="hand_R_02"><img src="images/dot_blue.png" alt="오른손 관절 02"/></a>
							<a id="hand_R_03"><img src="images/dot_blue.png" alt="오른손 관절 03"/></a>
							<a id="hand_R_04"><img src="images/dot_blue.png" alt="오른손 관절 04"/></a>
							<a id="hand_R_05"><img src="images/dot_blue.png" alt="오른손 관절 05"/></a>
							<a id="hand_R_06"><img src="images/dot_blue.png" alt="오른손 관절 06"/></a>
							<a id="hand_R_07"><img src="images/dot_blue.png" alt="오른손 관절 07"/></a>
							<a id="hand_R_08"><img src="images/dot_blue.png" alt="오른손 관절 08"/></a>
							<a id="hand_R_09"><img src="images/dot_blue.png" alt="오른손 관절 09"/></a>
							<a id="hand_L_01"><img src="images/dot_blue.png" alt="왼손 관절 01"/></a>
							<a id="hand_L_02"><img src="images/dot_blue.png" alt="왼손 관절 02"/></a>
							<a id="hand_L_03"><img src="images/dot_blue.png" alt="왼손 관절 03"/></a>
							<a id="hand_L_04"><img src="images/dot_blue.png" alt="왼손 관절 04"/></a>
							<a id="hand_L_05"><img src="images/dot_blue.png" alt="왼손 관절 05"/></a>
							<a id="hand_L_06"><img src="images/dot_blue.png" alt="왼손 관절 06"/></a>
							<a id="hand_L_07"><img src="images/dot_blue.png" alt="왼손 관절 07"/></a>
							<a id="hand_L_08"><img src="images/dot_blue.png" alt="왼손 관절 08"/></a>
							<a id="hand_L_09"><img src="images/dot_blue.png" alt="왼손 관절 09"/></a>
							<a id="foot_R_01"><img src="images/dot_blue.png" alt="오른발 관절 01"/></a>
							<a id="foot_R_02"><img src="images/dot_blue.png" alt="오른발 관절 02"/></a>
							<a id="foot_R_03"><img src="images/dot_blue.png" alt="오른발 관절 03"/></a>
							<a id="foot_R_04"><img src="images/dot_blue.png" alt="오른발 관절 04"/></a>
							<a id="foot_R_05"><img src="images/dot_blue.png" alt="오른발 관절 05"/></a>
							<a id="foot_L_01"><img src="images/dot_blue.png" alt="왼발 관절 01"/></a>
							<a id="foot_L_02"><img src="images/dot_blue.png" alt="왼발 관절 02"/></a>
							<a id="foot_L_03"><img src="images/dot_blue.png" alt="왼발 관절 03"/></a>
							<a id="foot_L_04"><img src="images/dot_blue.png" alt="왼발 관절 04"/></a>
							<a id="foot_L_05"><img src="images/dot_blue.png" alt="왼발 관절 05"/></a>
						</div>
					</div>
					<div class="body_line"></div>
				</li>
				<li id="question_02">
					<q>처음으로 관절이 아프신지 6주가 지났습니까?</q>
                                        <div class="answer_sheet">
                                                <ul>
                                                    <li><input type="radio" name="answer_02_yes_no" value="1"/><span>예</span></li>
                                                    <li><input type="radio" name="answer_02_yes_no" value="0"/><span>아니오</span></li>
                                                </ul>
					</div>
					<div class="body_line"></div>
				</li>
				<li id="question_03">
					<q>다음 증상 중 해당하는 것을 누르세요.</q>
					<ul class="answer_sheet_tab">
						<li>
							<a id="tab_03_01" class="current_tab">류마티스 관절염 증상</a>
						</li>
					</ul>
					<div class="answer_sheet">
						<ul id="as_tab_03_01">
							<li>
								아침에 관절이 뻣뻣합니다
								<input type="checkbox" name="answer_03_01" value="1"/>
							</li>
							<li>
								팔꿈치 또는 손가락에 덩어리가 만져집니다
								<input type="checkbox" name="answer_03_02" value="1"/>
							</li>
							<li>
								운동을 하면 금새 지칩니다
								<input type="checkbox" name="answer_03_03" value="1"/>
							</li>
							<li>
								손 또는 발이 저립니다
								<input type="checkbox" name="answer_03_04" value="1"/>
							</li>
						</ul>
						<br/><br/>
					</div>



					<ul class="answer_sheet_tab">
						<li>
							<a id="tab_03_02" class="current_tab">다른 증상</a>
						</li>
					</ul>
					<div class="answer_sheet">
						<ul id="as_tab_03_02">
							<li>
								자주 불안하고 초조합니다
								<input type="checkbox" name="answer_03_05" value="1"/>
							</li>
							<li>
								매일 밤마다 잠이 잘 오지 않습니다
								<input type="checkbox" name="answer_03_06" value="1"/>
							</li>
							<li>
								하루종일 기분이 우울하고 의욕이 나지 않습니다
								<input type="checkbox" name="answer_03_07" value="1"/>
							</li>
						</ul>
						<br/><br/>
					</div>



					<div class="body_line"></div>
				</li>
				<li id="question_04">
					<q>혈액 검사 결과 (RF, CRP 수치)를 알고 있으신가요?</q>
					<ul class="answer_sheet_tab">
						<li>
							<a id="tab_04_01" class="current_tab">예</a>
						</li>
						<li>
							<a id="tab_04_02" class="another_tab">아니오</a>
						</li>
					</ul>
					<div class="answer_sheet">
						<div id="as_tab_04_01">
							<span class="checkbox_04">류마티스 지표</span>
							<input type="checkbox" name="checker_04_01" value="1" checked="checked"/>RF 수치
							<input type="checkbox" name="checker_04_02" value="1" />ACPA 수치<br/>
							<input type="text" id="textinput_04_01" name="textinput_04_01" value=" RF 수치를 입력하세요"/><br/>
							<input type="text" id="textinput_04_02" name="textinput_04_02" value=" ACPA 수치를 입력하세요"/><br/>
							<span class="checkbox_04">급성염증 지표</span>
							<input type="checkbox" name="checker_04_03" value="1" checked="checked"/>CRP 수치
							<input type="checkbox" name="checker_04_04" value="1"/>ESP 수치<br/>
							<input type="text" id="textinput_04_03" name="textinput_04_03" value=" CRP 수치를 입력하세요"/><br/>
							<input type="text" id="textinput_04_04" name="textinput_04_04" value=" ESP 수치를 입력하세요"/><br/>
						</div>
						<div id="as_tab_04_02">
							설명입니다.
						</div>
					</div>
					<div class="save_or_show_result">
						<a id="show_result">
							<img src="images/ndd_talk_result.png" alt="show result"/>
						</a>
						<a class="cancel">
							<img src="images/ndd_talk_cancel.png" alt="cancel"/>
						</a>
					</div>
					<div class="body_line last_line"></div>
				</li>
			</ol>
		</div>

<!-- footer : start -->			
			<div style="width:100%;height:47px;float:left;padding-top:5px;">
				<div style='float:left;width:200px;height:20px;'></div>
				<div id='copyright_left' style='float:left;width:140px;height:20px;'>NextDoorDoctor © 2011</div>
				<div id="copyright_right" style='float:right;width:240px;height:20px;text-align:right;padding-right:5px;'>
				<a href='ndd_p1.php'>회사소개</a> <a href='ndd_p2.php'>개인정보보호</a> <a href='ndd_p3.php'>이용약관</a> <a href='ndd_p4.php'>고객센터</a>
				</div>
			</div>	
<!-- footer : end -->

	</div>
	<div id="footer">

	</div>
</body>
</html>
